#ifndef __FR_DEVICE_BATTERY__
#define __FR_DEVICE_BATTERY__

#ifdef __cplusplus
extern "C" {
#endif

#include "fr30xx.h" 
#include "app_task.h"
/* ADC demo select */
typedef enum
{
    ADC_SOFTWARE_TRIGGER_MODE,
    ADC_HARDWARE_TRIGGER_LOOP_MODE,
    ADC_HARDWARE_TRIGGER_IT_MODE,
}enum_ADC_Demo_t;

/* Exported functions --------------------------------------------------------*/

extern void device_vbat_init(enum_ADC_Demo_t fe_demo);
extern void adc_vbat_event_handle(void);
extern void adc_vbat_start_detect(void);

extern uint8_t transform_battery(uint16_t battery_value);
extern uint8_t battery_value_fifo_inc(uint8_t value);
extern void battery_value_fifo_init(uint16_t value);

#ifdef __cplusplus
}
#endif

#endif /* __FR_DEVICE_BATTERY__ */
